package com.yaohj.web.controller;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("test")
public class TestController {
    @GetMapping
    public String aa(){
        return "aa";
    }

    @Autowired
    private RedisProperties redisProperties;

    @PostConstruct
    public void checkConfig() {
        System.out.println("Redis Host: " + redisProperties.getHost());
        System.out.println("Redis Port: " + redisProperties.getPort());
    }
}
